<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="novatar" uri="/novatar-tags"%><%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<novatar:head title="demo3.name"></novatar:head>
<novatar:easyui />
<link href="${styles}/sample3.css?v=${version}" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${scripts}/sample3.js?v=${version}"></script>
<script type="text/javascript">
    window.contextPath = "${contextPath}";
</script>
</head>
<body class="easyui-layout">
    <div id="conditionDiv" class="easyui-panel"
        data-options="region:'north',split: false, collapsible:false, minHeight:48">
        <div id="searchCondition">
            <form id="queryForm" method="post" action="${contextPath}/sample/findPageByPeople.pvt">
                <div>
                    <span i18n="budget.year">年度</span>
                    &nbsp;&nbsp;
                    <input class="easyui-validatebox easyui-numberspinner" name="year" style="width: 160px"
                        data-options="min:2000,max:2050">
                </div>
                <div>
                    <span i18n="budgetItem.devOrg">研发小组</span>
                    &nbsp;&nbsp;
                    <select name="devOrgId" id="select_devOrgId" style="width:140px;" data-options="panelHeight:'auto'"></select>
                </div>
                <div id="query-toolbar">
                    <a href="javascript:void(0)" class="easyui-linkbutton"
                        iconCls="icon-search" plain="true" onClick="onSearch()">
                        <span i18n="search">查询</span>
                    </a>
                    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-revert"
                        plain="true" onClick="$('#queryForm').form('reset')">
                        <span i18n="reset">重置</span>
                    </a>
                </div>
            </form>
        </div>
    </div>
    <div data-options="region:'center'">
        <table id="budgetGrid" style="height: 100%;"></table>
    </div>
    
    <div class="hidden">
        <div id="datagrid-toolbar">
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-add',plain:true," onClick="onAdd()">
                <span i18n="add">新增</span>
            </a>
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-remove',plain:true" onClick="onDel()">
                <span i18n="delete">删除</span>
            </a>
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-edit',plain:true" onClick="onEdit()">
                <span i18n="edit">修改</span>
            </a>
        </div>
        <div id="dialog-toolbar">
            <a href="javascript:void(0)" class="easyui-linkbutton" onClick="onSave()"
                data-options="iconCls:'icon-save',plain:true">
                <span i18n="save">保存</span>
            </a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onClick="onReset()"
                data-options="iconCls:'icon-revert',plain:true">
                <span i18n="reset">重置</span>
            </a>
        </div>
        <div id="budgetItems-toolbar">
            <span i18n="budget.items" class="panel-title" style="padding-left:10px;padding-right:50px">预算详情</span>&nbsp;&nbsp;
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-add',plain:true," onClick="onAddBudgetItem()">
                <span i18n="budgetItem.add">新增</span>
            </a>
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-remove',plain:true," onClick="onDelBudgetItem()">
                <span i18n="budgetItem.del">删除</span>
            </a>
            <a href="javascript:void(0)" class="easyui-linkbutton"
                data-options="iconCls:'icon-ok',plain:true," onClick="onAcceptBudgetItem()">
                <span>结束编辑</span>
            </a>
        </div>
        <div id="budgetDialog" 
            style="text-align: center; width: 520px; height: auto" modal="true"
            maximizable="false" data-options="toolbar: '#dialog-toolbar',closed:true">
            <form id="budgetForm" method="post">
                <table style="width:100%;margin-top:5px;margin-bottom:5px;">
                    <tr>
                        <td class="fieldlabel"><span i18n="budget.year">年度</span><span class="red">*</span></td>
                        <td align="left" style="width:160px">
                            <input class="easyui-validatebox easyui-numberspinner" name="year" style="width: 160px"
                                required="required" data-options="min:2000,max:2050">
                        </td>
                        <td class="fieldlabel" style="width:80px"><span i18n="budget.money">金额</span><span class="red">*</span></td>
                        <td align="left" style="width:160px">
                            <input class="easyui-validatebox easyui-numberspinner" name="money" style="width: 160px"
                                required="required" data-options="precision:2,min:0">
                        </td>
                    </tr>
                </table>
                <table id="budgetItemsGrid" style="height: 260px;"></table>
            </form>
        </div>
    </div>
</body>
</html>